#include "widget.h"
#include "ui_widget.h"
#include<thread>
Widget::Widget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Widget)
{
    ui->setupUi(this);
    std::thread s([this](){
         int i=this->ui->lcdNumber->intValue();
         while(true)
         {
             std::this_thread::sleep_for(std::chrono::seconds(1));
             if(i<=0)
             {
                 break;
             }
             i-=1;
             this->ui->lcdNumber->display(i);
         }
    });
}

Widget::~Widget()
{
    delete ui;
}

